
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title></title>
		<!-- 全局css引入 必须 -->
		<link href="/style/style.css" rel="stylesheet" type="text/css">
		<style media="screen">
body {
	background-color: #93bde6;
}

div.version {
	font-weight: bold;
	font-size: 100%;
	margin-bottom: 8px;
}

h1 {
	font-weight: bold;
	font-size: 100%
}

option {
	padding: 2px 24px 2px 4px;
}

input {
	margin: 0px 0px 4px 12px;
}

table.data {
	font-size: 90%;
	border-collapse: collapse;
	border: 1px solid black;
}

table.data th {
	background: #bddeff;
	width: 25em;
	text-align: left;
	padding-right: 8px;
	font-weight: normal;
	border: 1px solid black;
}

table.data td {
	background: #ffffff;
	vertical-align: top;
	padding: 0px 2px 0px 2px;
	border: 1px solid black;
}

td.null {
	background: yellow;
}

td.available {
	color: black;
}

td.active {
	color: red;
}

td.offline {
	color: blue;
}

div.drill-down {
	
}

ul {
	list-style: none;
	padding: 0px;
	margin: 0px;
	position: relative;
	font-size: 90%;
}

li {
	padding: 0px;
	margin: 0px 4px 0px 0px;
	display: inline;
	border: 1px solid black;
	border-width: 1px 1px 0px 1px;
}

li.active {
	background: #bddeff;
}

li.inactive {
	background: #eeeeee;
}

li.disabled {
	background: #dddddd;
	color: #999999;
	padding: 0px 4px 0px 4px;
}

a.quiet {
	color: black;
	text-decoration: none;
	padding: 0px 4px 0px 4px;
}

a.quiet:hover {
	background: white;
}

td {
	border: #b4d6f1 1px solid;
	border-spacing: 0px;
}
</style>
	</head>
	<script type="text/javascript">
	function bdsc(){
		document.getElementById("upload").innerHTML="上传升级文件<input type='file' name='file'>";
	}
	function yc(){
		document.getElementById("upload").innerHTML="";
	}
	</script>
	<body>
		<div class="data" align="center">
			<div class="rightTitle2">
				<h3>
					数据库升级配置
				</h3>
			</div>
			<s:form action="dbCfg.do" method="post" cssClass="required-validate">
				<table cellpadding="0" cellspacing="0" class="formTable">
					<colgroup>
						<col width="15%" align="left" class="formLabel" />
						<col width="35%" align="left" />
						<col width="15%" align="left" class="formLabel" />
						<col width="35%" align="left" />
					</colgroup>
					<tr>
						<td>
							版本号：
						</td>
						<td>
							<s:textfield size="40" name="cfg.db_version" id="version" cssClass="required"></s:textfield>
						</td>
						<td width="15%">
							最后更新日期：
						</td>
						<td width="35%">
							<s:textfield size="40" name="cfg.db_updateDate" id="updateDate" cssClass="required"></s:textfield>
						</td>
					</tr>
					<tr>
						<td>
							本地数据库备份路径：
						</td>
						<td colspan="3">
							<s:textfield size="40" name="cfg.db_backUpPath" id="db_backUpPath" cssClass="required"></s:textfield>
						</td>
					</tr>
					<tr>
						<td>
							本地数据库url：
						</td>
						<td colspan="3">
							<s:textfield size="40" name="cfg.local_dbhost" id="local_dbhost" cssClass="required"></s:textfield>
						</td>
					</tr>
					<tr>
						<td>
							db账号：
							<!-- dbuser -->
						</td>
						<td>
							<s:textfield size="40" name="cfg.local_dbuser" id="local_dbuser" cssClass="required"></s:textfield>
						</td>
						<td>
							db密码：
							<!-- dbpwd -->
						</td>
						<td>
							<s:textfield size="40" name="cfg.local_dbpwd" id="local_dbpwd" cssClass="required"></s:textfield>
						</td>
					</tr>
					<tr>
						<td>
							远程数据库url：
						</td>
						<td colspan="3">
							<s:textfield size="40" name="cfg.remote_dbhost" id="remote_dbhost" cssClass="required"></s:textfield>
						</td>
					</tr>
					<tr>
						<td>
							远程数据库账号：
							<!-- dbuser -->
						</td>
						<td>
							<s:textfield size="40" name="cfg.remote_dbuser" id="remote_dbuser" cssClass="required"></s:textfield>
						</td>
						<td>
							远程数据库密码：
							<!-- dbpwd -->
						</td>
						<td>
							<s:textfield size="40" name="cfg.remote_dbpwd" id="remote_dbpwd" cssClass="required"></s:textfield>
						</td>
					</tr>
				</table>
				<table cellpadding="0" cellspacing="0" class="form_submit_bar">
					<tr>
						<td width="30%" align="center" colspan="4">
							<input class="buttonOk" id="button2" type="submit" value="保存" />
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input class="buttonOk" id="button2" type="reset" value="重置" />
						</td>
					</tr>
				</table>
			</s:form>
			<div class="rightTitle2">
				<h3>
					数据库升级
					<a href="updatelogList.do">日志</a>
				</h3>
			</div>
			<form action="dbUpdate.do" method="post" enctype="multipart/form-data">
				<table cellpadding="0" cellspacing="0" class="formTable">

				</table>
				<table cellpadding="0" cellspacing="0" class="form_submit_bar">
					<tr>
						<td width="30%" align="center" colspan="4">
							<input class="buttonOk" id="button2" type="submit" value="升级" />
						</td>
					</tr>
				</table>
			</form>
			<div class="rightTitle2">
				<h3>
					数据库还原
					<a href="updatelogList.do?action=recover">日志</a>
				</h3>
			</div>
			<form action="dbRecover.do" method="post">
				<table cellpadding="0" cellspacing="0" class="formLabel">
					<tr>
						<td class="formLabel">
							请选择要还原的备份文件：年_月_日_时_分_秒
						</td>
						<td>
							<s:select list="fileMap" name="forder"></s:select>
						</td>
					</tr>
				</table>
				<table cellpadding="0" cellspacing="0" class="form_submit_bar">
					<tr>
						<td width="30%" align="center" colspan="4">
							<input class="buttonOk" id="button2" type="button" value="还原" onclick="if(confirm('您真的要还原吗?点击确认进行还原操作！否则请点取消'))if(confirm('您真的要还原吗?点击确认进行还原操作！否则请点取消'))form.submit()" />
						</td>
					</tr>
				</table>
			</form>
	</body>
</html>